import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styles from './style.less';
import pic from '@/src/assets/comps/table/noData.png';

class NoDataC extends Component {
  // 默认值
  static defaultProps = {
    title: '暂无数据', // 默认提示信息
    width: '100%',
    height: '300px',
  };

  render() {
    const { title, width, height } = this.props;

    return (
      <div className={styles.noData} style={{ width, height }}>
        <img src={pic} width={114} height={78} />
        <div>{title}</div>
      </div>
    );
  }
}
// props默认值
NoDataC.propsTypes = {
  title: PropTypes.string, // 提示信息
  width: PropTypes.string, // 宽度
  hight: PropTypes.string, // 高度
};

export default NoDataC;
